# """
# 石头 剪刀 布
# """
# # 0石头  1剪刀  2布
# print('0代表石头  1代表剪刀  2代表布')
# # 用户先输入
# user = input('请您先输入:')
# # 判断用户输入的是否符合规则
# if user == '0' or user == '1' or user == '2':
#     user = int(user)
#     # 是
#     # 电脑随机输入
#     import random
#
#     comp = random.randint(0, 2)
#     print(f'电脑的输入是:{comp}')
#     # 判断谁输谁赢
#     # 如果用户输入的石头,电脑输入的是剪刀:用户赢
#     if user == 0 and comp == 1:
#         print('用户赢')
#     # 如果用户输入的剪刀,电脑输入的是布:用户赢
#     elif user == 1 and comp == 2:
#         print('用户赢')
#     # 如果用户输入的布,电脑输入的是石头:用户赢
#     elif user == 2 and comp == 0:
#         print('用户赢')
#     # 如果用户和电脑的输入是一样的/相等的:平局
#     elif user == comp:
#         print('平局')
#     # 其他情况: 电脑赢
#     else:
#         print('电脑赢')
#
# else:
#     print('输入不符合规则')


# 正方形

# 循环变量
# line = 1
# # 循环判断
# while line <= 5:
#     # 循环体
#     # 循环变量
#     n = 1
#     # 循环判断
#     while n <= 5:
#         # 循环体
#         print("*", end="")
#         # 循环变量发生变化
#         n += 1
#     print()
#     # 循环变量的变化
#     line += 1

# 三角形

# *
# **
# ***
# ****
# *****

# 循环变量
# line = 1
# # 循环判断
# while line <= 5:
#     # 循环体
#     # 循环变量
#     n = 1
#     # 循环判断
#     while n <= line:
#         # 循环体
#         print("*", end="")
#         # 循环变量发生变化
#         n += 1
#     print()
#     # 循环变量的变化
#     line += 1


# 九九乘法表

# # 循环变量
# line = 1
# # 循环判断
# while line <= 9:
#     # 循环体
#     # 循环变量
#     n = 1
#     # 循环判断
#     while n <= line:
#         # 循环体
#         print(f"{n}*{line}={n*line}", end="\t")
#         # 循环变量发生变化
#         n += 1
#     print()
#     # 循环变量的变化
#     line += 1

# 右对齐三角形

#     *
#    **
#   ***
#  ****
# *****


# # 循环变量
# line = 1
# # 循环判断
# while line <= 5:
#     # 循环体
#
#     m = 1
#     while m <= (5 - line):
#         print(' ', end='')
#         m += 1
#
#     # 循环变量
#     n = 1
#     # 循环判断
#     while n <= line:
#         # 循环体
#         print("*", end="")
#         # 循环变量发生变化
#         n += 1
#     print()
#     # 循环变量的变化
#     line += 1

# 等腰三角形

 # ####*
 # ###***
 # ##*****
 # #*******
 # *********



# 循环变量
line = 1
# 循环判断
while line <= 5:
    # 循环体

    m = 1
    while m <= (5 - line):
        print(' ', end='')
        m += 1

    # 循环变量
    n = 1
    # 循环判断
    while n <= 2*line-1:
        # 循环体
        print("*", end="")
        # 循环变量发生变化
        n += 1
    print()
    # 循环变量的变化
    line += 1